<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>天天互保-保单详情</title>
<meta name="format-detection" content="telephone=no" />
<meta name="keywords" content="天天互保"> 
<meta name="description" content="天天互保"> 
<meta content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0,user-scalable=no" name="viewport">
<link rel="stylesheet" href="__CSS__/style.css">
<link rel="stylesheet" href="__CSS__/index.css">
<link rel="stylesheet" href="__CSS__/type_info.css">
<style>
.gongshitable{position: relative;}
.xuanfu{position: absolute;width:50%;left:25%;top:25%;}
.mymutualline .mutualinfo{width:45%;}
.mymutualline .newjia{width:25%;float: left;height: 53px;text-align:center;}
.mymutualline .newjia p{font-size:12px;color:#2f2f2f;}
.mymutualline .newjia a{margin-top:10px;background: #ff6356;display:block;color:#fff;font-size:14px; height: 25px;line-height: 25px;border-radius: 2px;}

</style>
<!-- banner -->
<script src="__JS__/jquery.min.js"></script>
</head>
<body>

<div class="typeBox nomargin1 mymutualline">
	<div class="mutualimg"><img src="__ROOT__/{$baodan.src}" alt=""></div>
	<div class="mutualinfo">
		<h1 class="font16">{$baodan.username}<em class="font14">{$baodan.jtitle}</em></h1>
		<p class="font14 hots"><img src="__IMG__/hot1.png" alt="">{$baodan.num}人参与</p>
	</div>
	<div class="newjia">
		<p>余额:{$baodan.yufujin}元</p>
		<a href="__URL__/chongzhi/bao/{$baodan.bid}" class="cz">充值</a>
	</div>
</div>

<div class="gongshitable">
	<div class="gs_line font12"><p>姓名</p><span>{$baodan.username}</span></div>
	<div class="gs_line font12"><p>身份证</p><span>{$baodan.userid}</span></div>
	<div class="gs_line font12"><p>保障状态</p><span>
<?php 
 $baodan['usetime'];
  $wait=$baodan["waitdate"];
  $end=strtotime($baodan['usetime'])-time();
  if($end>0){
  $now=$end/86400;
  echo "距离等待期结束还有".floor($now)."天";
  }else{
  echo "进入保障期，可以申请互保了";
  }
?>

	

	</span>
	</div>
	<div class="gs_line font12"><p>加入时间</p><span>{$baodan.addtime}</span></div>
	<if condition="$tiao.sid eq '' ">
	<else /> 
	<div class="gs_line font12 no_bbottom" onclick="window.location.href='__URL__/application/xq/{$tiao.sid}'"><p>申请详情</p><span>详情详情&gt;&gt;</span></div>
	</if>
</div>
<!--  列表-->

	<if condition="$tiao.id eq '' ">
		<if condition="$dengdai eq 1 ">
		<div class="addhubao"><a class="submits" href="__URL__/addhubao/gid/{$baodan.bid}">申请互保</a></div>
		<else /> 
		<div class="addhubao"><a class="submits" style="background-color: grey" >申请互保</a></div>
		</if>
		<span style="margin: 2px"></span>
			<div class="goodsnote font12">
				<ul>
					<li onclick="showinfo(0)"><img src="__IMG__/planinfo1.png"/><br/>会员公约</li>
					<li onclick="showinfo(1)"><img src="__IMG__/planinfo2.png"/><br/>服务条款</li>
					<li onclick="showinfo(2)" class="youb"><img src="__IMG__/planinfo3.png"/><br/>互保流程</li>
				</ul>
			</div>	

		<div class="addhubao" style="margin-bottom:15px;"><a class="submits" href="javascript:exit({$baodan['bid']})">退出计划</a></div>

		<!-- __URL__/exitbao/id/{$baodan['bid']}} -->
    <else /> 
    <div class="shenqingline martop10" onclick="window.location.href='application_details.html'" style="width:90%;margin-left:4.5%;margin-right:4.5%;">
	<p>申请详情</p><img src="__IMG__/more4.png" class="publicityico">
	</div>
	<div class="goodsnote font12">
	<ul>
		<li onclick="showinfo(0)"><img src="__IMG__/planinfo1.png"/><br/>会员公约</li>
		<li onclick="showinfo(1)"><img src="__IMG__/planinfo2.png"/><br/>服务条款</li>
		<li onclick="showinfo(2)" class="youb"><img src="__IMG__/planinfo3.png"/><br/>互保流程</li>
	</ul>
</div>	
	<div class="addhubao" style="margin-bottom:10px;"><a class="submits" href="__URL__/exitbao/jid/{$bao['jid']}">退出计划</a></div>
    </if>

<script>
	function exit(bao) {
	    if(confirm("执行后将无法恢复，确定继续吗？温馨提示"))
        {
			$.post("__URL__/exitbao", {bao:bao}, function(data) {
			   if (data==0) {
			   	alert('计划已经开始筹款不得退出！')
			   }else if(data==1){
			   	alert('您已退出该计划!');
			   	location.href="/Baodan";
			   }else if(data==2){
			   	alert('发生错误！');
			   }else{
			   	alert("您已经退出不要重复点击");
			   	location.href="/Baodan";
			   }
			   // alert(data);
			})
	  }
	}
</script>



<!--BEGIN 弹出框-->
<div class="pop_up" id="pop0" style="display:none;">
	<div class="pop_upbg"></div>
	<div class="pop_uplog font14">
		<div class="pop_title">会员公约</div>
		<div class="pop_info font12">
			{$gongyue}
		</div>
		<div class="pop_button">
			<a href="javascript:;">我知道了</a>
		</div>
	</div>
</div>
<div class="pop_up" id="pop1" style="display:none;">
	<div class="pop_upbg"></div>
	<div class="pop_uplog font14">
		<div class="pop_title">服务条款</div>
		<div class="pop_info font12">
		{$kuan['content']}
		</div>
		<div class="pop_button">
			<a href="javascript:;">我知道了</a>
		</div>
	</div>
</div>

<div class="pop_up" id="pop2" style="display:none;">
	<div class="pop_upbg"></div>
	<div class="pop_uplog font14">
		<div class="pop_title">互保流程</div>
		<div class="pop_info font12">
			{$liucheng}
		</div>
		<div class="pop_button">
			<a href="javascript:;">我知道了</a>
		</div>
	</div>
</div>
<!----END弹出层结束---->
<script>
function showinfo(i){
	$('#pop'+i).show().on('click', '.pop_button a', function () {
			$('#pop'+i).off('click').hide();
	});
}
$(document).ready(function(){
	$('.menu_li').on('click',function(){
		$('.menu_liinfo').fadeIn(1000).css('display','block');
	})
})
</script>
</body>
</html>